package cloud.dandanit.itservice.service.impl;

import cloud.dandanit.itservice.entity.StatisticsAnalysis;
import cloud.dandanit.itservice.entity.record.ArticleRecord;
import cloud.dandanit.itservice.mapper.record.ArticleRecordMapper;
import cloud.dandanit.itservice.service.record.ArticleRecordService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程简介 服务实现类
 * </p>
 *
 * @author luokai
 * @since 2022-07-07
 */
@Service
public class ArticleRecordServiceImpl extends ServiceImpl<ArticleRecordMapper, ArticleRecord> implements ArticleRecordService {

    @Autowired
    private ArticleRecordMapper articleRecordMapper;

    /**
     * 增加记录
     */
    @Override
    public void addRecord() {
        ArticleRecord articleRecord = new ArticleRecord();
        this.save(articleRecord);
    }

    /**
     * 统计记录
     * @param day 指定天
     * @return 条数
     */
    @Override
    public Integer statisticsData(String day) {

        Integer count = articleRecordMapper.statisticsData(day);
        return count;
    }
}
